3.301 \(\int \frac {c+d x^n}{a+b x^n} \, dx\)

Optimal. Leaf size=42 \[ \frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b}+\frac {d x}{b} \]

[Out]

d*x/b+(-a*d+b*c)*x*hypergeom([1, 1/n],[1+1/n],-b*x^n/a)/a/b

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {388, 245} \[ \frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b}+\frac {d x}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x^n)/(a + b*x^n),x]

[Out]

(d*x)/b + ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/(a*b)

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rubi steps

\begin {align*} \int \frac {c+d x^n}{a+b x^n} \, dx &=\frac {d x}{b}-\frac {(-b c+a d) \int \frac {1}{a+b x^n} \, dx}{b}\\ &=\frac {d x}{b}+\frac {(b c-a d) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 40, normalized size = 0.95 \[ \frac {x \left ((b c-a d) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )+a d\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^n)/(a + b*x^n),x]

[Out]

(x*(a*d + (b*c - a*d)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)]))/(a*b)

________________________________________________________________________________________

fricas [F]  time = 0.73, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {d x^{n} + c}{b x^{n} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="fricas")

[Out]

integral((d*x^n + c)/(b*x^n + a), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {d x^{n} + c}{b x^{n} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="giac")

[Out]

integrate((d*x^n + c)/(b*x^n + a), x)

________________________________________________________________________________________

maple [F]  time = 0.61, size = 0, normalized size = 0.00 \[ \int \frac {d \,x^{n}+c}{b \,x^{n}+a}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^n+c)/(b*x^n+a),x)

[Out]

int((d*x^n+c)/(b*x^n+a),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ {\left (b c - a d\right )} \int \frac {1}{b^{2} x^{n} + a b}\,{d x} + \frac {d x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="maxima")

[Out]

(b*c - a*d)*integrate(1/(b^2*x^n + a*b), x) + d*x/b

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {c+d\,x^n}{a+b\,x^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^n)/(a + b*x^n),x)

[Out]

int((c + d*x^n)/(a + b*x^n), x)

________________________________________________________________________________________

sympy [C]  time = 4.11, size = 73, normalized size = 1.74 \[ - \frac {d x \Phi \left (\frac {a x^{- n} e^{i \pi }}{b}, 1, \frac {e^{i \pi }}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{b n^{2} \Gamma \left (1 + \frac {1}{n}\right )} + \frac {c x \Phi \left (\frac {b x^{n} e^{i \pi }}{a}, 1, \frac {1}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{a n^{2} \Gamma \left (1 + \frac {1}{n}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x**n)/(a+b*x**n),x)

[Out]

-d*x*lerchphi(a*x**(-n)*exp_polar(I*pi)/b, 1, exp_polar(I*pi)/n)*gamma(1/n)/(b*n**2*gamma(1 + 1/n)) + c*x*lerc
hphi(b*x**n*exp_polar(I*pi)/a, 1, 1/n)*gamma(1/n)/(a*n**2*gamma(1 + 1/n))

________________________________________________________________________________________